<?php

class FCKDrawUtil {

	public static function getFCKDrawEditor($name = 'FCKEditor1') {
		include_once "web/fck-draweditor/fckeditor.php";
		// $sBasePath = 'http://fck-draw.finalsclub.org/fckeditor/';
		$sBasePath = '/fck-draweditor/';
		$oFCKeditor = new FCKeditor($name) ;
		$oFCKeditor->BasePath = $sBasePath ;
		$oFCKeditor->Config['SkinPath'] = $sBasePath . 'editor/skins/silver/' ;
		$oFCKeditor->ToolbarSet = "custom";
		$oFCKeditor->Height = "600px";
		$oFCKeditor->Value = 'Empty';
		//$oFCKeditor->Create() ;

		return $oFCKeditor;
	}

	public static function getFCKDrawWhiteBoard($oFCKeditor, $unique_key = 'uniqueKey1') {
		if(!$oFCKeditor) {
			return null;
		}
		include_once "web/whiteboard/whiteboard.php";
		$oWhiteboard = new whiteboard("tfc_" . $unique_key);
		$oWhiteboard->hashkey = "6e03ae85c1e7c5f2d5feeeadf6cbf997";
		$oWhiteboard->fck_instance = $oFCKeditor->InstanceName;
		//$oWhiteboard->Create();

		return $oWhiteboard;
	}
}


